package com.pick.base.constants;

/**
 * 系统常量类
 */
public class SystemConstants {

    /**
     * 用户状态常量
     */
    public static final class UserStatus {
        /** 启用 */
        public static final Integer ENABLED = 1;
        /** 禁用 */
        public static final Integer DISABLED = 0;
    }

    /**
     * 菜单类型常量
     */
    public static final class MenuType {
        /** 目录 */
        public static final String DIRECTORY = "M";
        /** 菜单 */
        public static final String MENU = "C";
        /** 按钮 */
        public static final String BUTTON = "F";
    }

    /**
     * 角色状态常量
     */
    public static final class RoleStatus {
        /** 启用 */
        public static final Integer ENABLED = 1;
        /** 禁用 */
        public static final Integer DISABLED = 0;
    }

    /**
     * 权限状态常量
     */
    public static final class PermissionStatus {
        /** 启用 */
        public static final Integer ENABLED = 1;
        /** 禁用 */
        public static final Integer DISABLED = 0;
    }

    /**
     * 菜单状态常量
     */
    public static final class MenuStatus {
        /** 显示 */
        public static final Integer VISIBLE = 1;
        /** 隐藏 */
        public static final Integer HIDDEN = 0;
    }

    /**
     * 默认密码
     */
    public static final String DEFAULT_PASSWORD = "123456";

    /**
     * 超级管理员角色代码
     */
    public static final String SUPER_ADMIN_ROLE = "admin";

    /**
     * 登录失败相关常量
     */
    public static final class LoginFail {
        /** 登录失败缓存键前缀 */
        public static final String CACHE_KEY_PREFIX = "login:fail:";
        /** 最大失败次数 */
        public static final int MAX_FAIL_COUNT = 5;
        /** 锁定时间（秒） */
        public static final long LOCK_TIME = 30 * 60;
    }

    /**
     * 缓存键常量
     */
    public static final class CacheKey {
        /** 用户权限缓存键前缀 */
        public static final String USER_PERMISSIONS = "user:permissions:";
        /** 用户角色缓存键前缀 */
        public static final String USER_ROLES = "user:roles:";
        /** 用户菜单缓存键前缀 */
        public static final String USER_MENUS = "user:menus:";
    }
}